﻿using PetaPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QDChat.Domain
{
    [TableName("chat_message")]
    [PrimaryKey("id")]
    public class Message
    {
        public Message()
        {
            SendTime = DateTime.Now;
        }

        public int Id { get; set; }
        /// <summary>
        /// 发消息人
        /// </summary>
        public int FromUid{ get; set; }
        /// <summary>
        /// 收消息人
        /// </summary>
        public int ToUid { get; set; }
        /// <summary>
        /// 消息内容
        /// </summary>
        public string Msg { get; set; }
        /// <summary>
        /// 消息类型(0 文本消息, 1 图片,2 文件)
        /// </summary>
        public int MsgType { get; set; } = 0;
        /// <summary>
        /// 发送类型(0 单聊,1 群发)
        /// </summary>
        public int SendType { get; set; } = 0;
        /// <summary>
        /// 消息状态(0 未读, 1 已读)
        /// </summary>
        public int MsgState { get; set; }
        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime SendTime { get; set; }
    }
}